<template>
  <div class="header wow fadeInDown" id="header">
    <div class="headerLeft">
      <!-- <span class="logo">LOGO</span> -->
      <div class="header-logo">
        <img src="./assets/worldwidegroup.png" alt="" class="LOGO1">
      </div>
    </div>
    <div class="headerCenter">
      <div class="title">
        <div class="title1">{{ props.title }}</div>
      </div>
    </div>
    <div class="headerRight">
      <!-- <span class="wendu">27°C</span>
      <div class="line"></div> -->
      <div class="dateTime" v-if="showTime">
        <div class="date">{{ time }}</div>
        <div class="time">{{ date }}</div>
      </div>
    </div>
    <!-- <sequence fileName="topbg18/topbg_" fileLength="74" IntervalTime="80"></sequence> -->

  </div>
</template>

<script setup lang="ts">
import {ref,onMounted} from 'vue'
import dayjs from 'dayjs'
import WOW from "wow.js";
const props = defineProps({
  title:{
    type:String,
    default:''
  },
  showTime:{
    type:Boolean,
    default:true
  }
})
const date = ref(dayjs().format("YYYY-MM-DD"))
const time = ref(dayjs().format("HH:mm:ss"))
// const images =  ref([])
// const week = computed(()=>{
//   var datas = dayjs().day()
//   var week = ['日', '一', '二', '三', '四', '五', '六']
//   return week[datas]
// })
onMounted(() => {
  var wow = new WOW({
      boxClass: "wow", // animated element css class (default is wow)
      animateClass: "animated", // animation css class (default is animated)
      offset: 0, // distance to the element when triggering the animation (default is 0)
      mobile: true, // trigger animations on mobile devices (default is true)
      live: true, // act on asynchronously loaded content (default is true)
      callback: function () {
        // the callback is fired every time an animation is started
        // the argument that is passed in is the DOM node being animated
      },
      scrollContainer: null, // optional scroll container selector, otherwise use window,
      resetAnimation: true, // reset animation on end (default is true)
    });
    wow.init();
    setInterval(function () {
      time.value = dayjs().format("HH:mm:ss");
    }, 1000);
})
</script>

<style lang="scss" scoped>
.header {
  width: 100%;
  height: 70px;
  z-index: 1;
  background: url("./assets/topbg1.png") top left no-repeat;
  background-size: 100% 70px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: nowrap;
  flex-direction: row;
  align-content: flex-start;


  .headerLeft {
    width: 16%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    align-content: flex-start;
    font-size: 0.8rem;
    font-weight: 500;
    color: #FFFFFF;
    // margin-top: .5rem;
    font-size: 1.8rem;
    color: #E9F7FF;
    // margin-left: 5.3rem;
    // margin-right: 1.3rem;
    .logo {
      color: #E9F7FF;
      margin-left: 5.3rem;
      margin-right: 1.3rem;
    }
    .header-logo{
      margin-right: 1rem;
      display: flex;
      align-items: center;
      .LOGO1{
        width: 9rem;
        height: 2.4rem;
      }
      .LOGO2{
        width: 9rem;
        height: 2.5rem;
      }
    }

    
  }
  .headerCenter{
    width: 25%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    .title {
      display: flex;
      justify-content: flex-start;
      align-items: flex-start;
      flex-wrap: nowrap;
      flex-direction: column;
      align-content: flex-start;
      flex-shrink: 0;
      // background: #ffffff;
      // -webkit-background-clip: text;
      // -webkit-text-fill-color: transparent;
      font-family: YouSheBiaoTiHei;
      font-size: 1.6rem;
      font-weight: 700;
      // text-shadow: 1px 1px 6px #9eeee791;
      color: #FFFFFF;
      filter: drop-shadow(0px 0px .5rem #9eeee791);
    }
  }

  .headerRight {
    width: 16%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: nowrap;
    flex-direction: row;
    // height: 4rem;
    align-content: flex-start;
    // margin-right: 1.5rem;

    .wendu {
      font-size: 0.95rem;
      color: #FFFFFF;
      line-height: 1.1rem;
      text-shadow: 0px 0.1rem 0.2rem rgba(0, 0, 0, 0.5);
    }

    .line {
      width: 0.05rem;
      height: 1.2rem;
      opacity: 0.5;
      border: 0.05rem solid #FFFFFF;
      margin-right: 1.3rem;
      margin-left: 1.3rem;
    }

    .dateTime {
      display: flex;
      justify-content: flex-start;
      align-items: flex-start;
      flex-wrap: nowrap;
      flex-direction: column;
      align-content: flex-start;

      .date {
        font-size: 1rem;
        color: #FFFFFF;
        line-height: 1.15rem;
        letter-spacing: 0.1rem;
        text-shadow: 0px 0.1rem 0.2rem rgba(0, 0, 0, 0.5);
      }

      .time {
        font-size: 0.6rem;
        color: #CBCBCB;
        line-height: 0.75rem;
        text-shadow: 0 0.1rem 0.2rem rgba(0, 0, 0, 0.5);
      }
    }
  }
}
</style>
